package org.zht.dormpro.dorm.cacher.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.zht.dormpro.dorm.aop.annotation.GetCache;
import org.zht.dormpro.dorm.cacher.IFloorCacher;
import org.zht.dormpro.dorm.mapper.TbFloorMapper;
import org.zht.dormpro.dorm.model.TbFloor;
import org.zht.dormpro.pub.constant.CacheKey;

import java.util.List;

@Repository
public class FloorCacherImpl implements IFloorCacher {

    @Autowired
    private TbFloorMapper tbFloorMapper;
    @GetCache(key = CacheKey.Floor_LIST_KEY, type = List.class)
    @Override
    public List<TbFloor> getAllFloor(){
        List<TbFloor> allFloor = tbFloorMapper.getAllFloor(1);
        return allFloor;
    }
}
